package com.uam.core.entity.model.entity.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.sql.Timestamp;
import java.util.Set;

/**
 *
 * @author lishf
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
public class TaskModel {

	private int id = -1;

	private String name = null;

	private int status = 0;

	private int authorId = 0;

	private String authorName = null;

	private String settings = null;

	private Timestamp createTime = null;

	private Timestamp updateTime = null;

	private Timestamp startTime = null;

	private Timestamp endTime = null;

	private int mode = 0;

	private double altitude = 0.00D;

	private double predictDistance = 0.00D;

	private double actualDistance = 0.00D;

	private double predictCost = 0.00D;

	private double actualCost = 0.00D;

	private int aircraftId = -1;

	private Set<String> detectedTaskIds = null;

	public enum Status {

		/** 待起飞 */
		READY(0),
		/** 飞行中 */
		RUNNING(1),
		/** 避让 */
		WAITING(2),
		/** 降落 */
		RECYCLE(3),
		/** 完成 */
		TERMINATE(4),
		/** 拒绝 */
		REJECTED(5),
		/** 取消 */
		CANCEL(6);

		private int code = 0;

		private Status(int code) {
			this.code = code;
		}

		public int getCode() {
			return code;
		}

	}
}
